import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class SavePanel extends JPanel implements ActionListener {
    private Icon bgOff = Util.getIcon("/images/buttonOff.jpg");
    private Icon bgSave = Util.getIcon("/images/buttonSave.jpg");
    private ATM frame;
    private JButton offButton = new JButton(bgOff);
//    private JButton savePanel = new JButton(bgSave);

    public SavePanel(ATM frame) {
        this.frame = frame;
        this.setLayout(null);
        this.setOpaque(false);
//        savePanel.setBounds(300, 500, 100, 50);
//        this.add(savePanel);
        offButton.setBounds(300, 600, 100, 50);
        this.add(offButton);
//        savePanel.addActionListener(this);
        offButton.addActionListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == offButton) {
            frame.switchPanel("menu");
        }
    }
}
